﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace idataplatform
{
    public partial class qhxsel : Form
    {
        public qhxsel()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            pubcls.qhxselSQL = "SELECT qtype,scqno,qname,qnos,qyxq,phoneno,hyno,fqyw,hxyw,hxddno,hxtime,hxdx,hxusers FROM qhxtab_ipark WHERE hxtime>='" + dateTimePicker1.Value.ToShortDateString() + "' and hxtime<='" + dateTimePicker2.Value.AddDays(1).ToShortDateString() + "'";

            this.DialogResult = DialogResult.OK;
            this.Dispose();
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            dateTimePicker1.Text = DateTime.Now.AddDays(-8).ToShortDateString();
            dateTimePicker2.Text = DateTime.Now.AddDays(-1).ToShortDateString();
        }

        private void qhxsel_Load(object sender, EventArgs e)
        {
            dateTimePicker1.Text = DateTime.Now.AddDays(-8).ToShortDateString();
            dateTimePicker2.Text = DateTime.Now.AddDays(-1).ToShortDateString();
        }
    }
}
